<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let arr1 = ["zhangsan", "lisi", "wangwu"]
        let resArr = arr1.filter(value => value.length === 3)
        console.log(resArr)
        let resArr1 = arr1.find(value => value.length === 3)
        console.log(resArr1)
        console.log(arr1)
        console.log(arr1.map((value, index, arr) => {
            console.log(value)
            console.log(index)
            console.log(arr)
            return value + "A"
        }))
        arr1.push(567)
        console.log(arr1)
        arr1.unshift(123)
        console.log(arr1)
        arr1.splice(1, 2, "a", "b")
        console.log(arr1)
        let arr2 = arr1.slice(2, 4)
        console.log(arr2)
        let arr3 = arr1.slice(2)
        console.log(arr3)
        let arr4 = [1, 2, 3, 4, 5]
        let arr5 = arr4.reduce((previousValue, currentValue) => {
            return previousValue + currentValue * 2
        }, 10)
        console.log(arr5)
        for (let i = 0; i < arr4.length; i++) {
            console.log(arr.length(i));
        }
        for (item of arr4) {
            console.log(item)
        }
        6
        for (index in arr4) {
            console.log(arr4[index])
        }
    </script>
</body>

</html>